package com.think.common.core.exception.enums;

public enum ErrorCode {
    GENERIC_ERROR(400000, "通用错误", "Generic error"),
    NOT_FOUND(400001, "未找到", "Not found"),
    PARAMETER_ERROR(400002, "参数错误", "Parameter error"),
    /**
     * 登录模块
     */
    EMAIL_REGISTERED(400003, "邮箱已注册,请登录", "Email has been registered, please login"),
    REPEAT_VERIFICATION_CODE(400004, "请勿重复发送验证码", "Do not repeat the verification code"),
    VERIFICATION_CODE_ERROR(400005, "验证码错误", "Verification code error"),
    SYSTEM_BUSY(400006, "系统繁忙", "System busy"),
    USER_NOT_EXIST(400007, "用户不存在", "User does not exist"),
    USERNAME_OR_PASSWORD_ERROR(400008, "用户名或密码错误", "The user name or password is incorrect"),
    /**
     * 商城模块
     */
    STOCK_IS_ZERO_ERROR(500001, "库存为0，不可上架！", "Inventory is 0 and cannot be listed"),
    CATEGORY_NAME_EXIST_ERROR(500002, "类目名称重复！", "Duplicate category names"),
    INTELLIGENT_GROUPING_NOT_PRODUCT_ERROR(500003, "商品智能分组添加未筛选出合适商品！", "Product intelligent grouping addition did not filter out suitable products"),
    SHIPPING_TEMPLATES_REGION_ERROR(500004, "暂时无法向此区域配送,请更换地址", "Delivery to this area is temporarily unavailable, please change the address"),
    SHIPPING_TEMPLATES_PRODUCT_ERROR(500005, "商品信息不在同一区域", "Product information is not in the same area"),
    PRODUCT_INSUFFICIENT_INVENTORY_ERROR(500006, "库存不足", "Insufficient inventory of goods"),
    PRODUCT_NOT_EXIST_ERROR(500007, "商品不存在", "The product does not exist"),
    PRODUCT_SKU_NOT_EXIST_ERROR(500008, "商品规格不存在", "The product specification does not exist"),
    PRODUCT_OFF_SHELF_ERROR(500009, "商品已下架", "The product has been delisted"),
    ADDRESS_NOT_EXIST_ERROR(500010, "请添加一个地址", "Please add an address"),
    SHOP_CART_NOT_EXIST_ERROR(500011, "购物车不存在", "Shopping cart does not exist"),
    ORDER_NOT_EXIST_ERROR(500012, "订单不存在", "Order does not exist"),
    PRODUCT_COUPON_RECEIVE_ERROR(500013, "领取优惠券到达上限", "Receiving coupons has reached the upper limit"),
    PRODUCT_COUPON_NOT_EXISTS(500014, "优惠券不存在", "The coupon does not exist"),
    NOT_PRODUCT_COUPON_ERROR(500015, "无可领优惠券！", "No coupons available for collection"),
    COUPON_DATE_INTERVAL_ERROR(500016, "用券时间不能超过一年哦～", "The use of vouchers cannot exceed one year"),
    PAYMENT_ERROR(500017, "发起支付失败", "Failure to initiate payment"),
    PRODUCT_STOCK_HANDLE_ERROR(500018, "库存操作异常", "Inventory operation exception"),
    ORDER_CANNOT_CANCEL_ERROR(500019, "订单取消失败", "Order cancellation failed"),
    ORDER_CANNOT_RECEIPT_ERROR(500020, "确认收货失败", "Confirmation of receipt failed"),
    ORDER_DETAIL_NOT_EXIST_ERROR(500021, "订单明细不存在", "Order details do not exist"),
    NOT_MYSELF_ORDER_ERROR(500022, "不能查看和操作他人订单", "Unable to view and manipulate orders from others"),

    ORDER_NOT_DELETE_ERROR(500023, "订单不能删除", "Order cannot be deleted"),

    ORDER_NOT_REPEAT_SHIPMENT_ERROR(500024, "订单不能重复发货", "Orders cannot be shipped repeatedly"),
    INTELLIGENT_GROUPING_LOGIC_ERROR(500025, "您设定的筛选条件有误，请重新设定", "The filtering criteria you set are incorrect. Please reset them"),
    ORDER_PAYMENT_PROCESS(500026, "订单支付中,请勿重复支付", "Please do not pay twice during order payment"),
    ORDER_NOT_AFTER_SALES_ERROR(500027, "该订单不能售后", "This order is not eligible for after-sales service"),
    ORDER_REFUND_NUMBER_LACK_ERROR(500028, "可退款商品数量不足", "Insufficient quantity of refundable products"),
    AFTER_SALES_NOT_EXIST_ERROR(500029, "售后订单不存在", "The after-sales order does not exist"),
    ORDER_NOT_COMMENT_ERROR(500030, "该订单未完成，不可评价", "The order is not completed，cannot be evaluated"),
    ORDER_HAS_BEEN_COMMENT_ERROR(500031, "该订单已评论", "The order has been reviewed"),
    SALES_NOT_DEL_ERROR(500032, "该售后订单未结束，不可删除", "This after-sales order is not completed and cannot be deleted"),
    SALES_NOT_USER_DEL_ERROR(500033, "该售后订单用户未删除，不可删除", "The user of the after-sales order has not been deleted and cannot be deleted"),
    ORDER_INTEGRAL_USE_ERROR(500034, "请选择正确的积分抵扣值", "Please select the correct point deduction value"),
    INTEGRAL_BALANCE_ERROR(500035, "积分余额不足", "Insufficient points balance"),
    ORDER_COMMENT_OUT_TIME_ERROR(500036, "订单已超过可评论时间", "Orders have expired for comment"),
    ORDER_COMMENT_NOT_ALLOW_ERROR(500037, "该订单不可评价", "This order is not evaluable"),
    EMAIL_USE_ERROR(500038, "该邮箱不存在或不可用", "the mailbox does not exist or is unavailable"),
    EMAIL_SPEND_ERROR(500039, "邮件发送异常", "mail sending exception")
    ;



    private final int code;
    private final String messageCn;
    private final String messageEn;


    ErrorCode(int code, String messageCn, String messageEn) {
        this.code = code;
        this.messageCn = messageCn;
        this.messageEn = messageEn;
    }

    public int getCode() {
        return code;
    }

    public String getMessageCn() {
        return messageCn;
    }

    public String getMessageEn() {
        return messageEn;
    }


}
